<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
<body>

<script language="javascript" type="text/javascript">
	
	function queryRoombi(){
		var form = $("#form2");
		form.attr("action","queryRoombi.do");
		form.submit();
	}
	
</script>

<ul class="breadcrumb">
  <li><a>按用户打钱</a></li>
</ul>
<form class="form-inline" action="issueRoombi.do" method="post">
  <input type="text" class="input-small" placeholder="玩家ID" name="playerId">
  <input type="text" class="input-small" placeholder="房币" name="roombi" value="${roombi}">
  <input type="text" placeholder="备注" name="remark" value="${remark}">
  <button type="submit" class="btn">打钱</button>
</form>

<ul class="breadcrumb">
  <li><a>按房间打钱</a></li>
</ul>
<form id="form2" class="form-inline" action="issueByRoom.do" method="post">
<table>
	<tr>
    	<td><input type="text" class="input-small" placeholder="房间id" name="adminId" value="${adminId}"></td>
 		<td>
			<label class="control-label" for="begtime">选择时间:</label>
		</td>
 		<td>
 			<div class="controls">
				<div class="input-append datepicker" id="datetimepicker"   pickTime=true >
				    <input data-format="yyyy-MM-dd" type="text" name="datetime" id="datetime" value="${datetime}"></input>
				    <span class="add-on">
				      <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
				    </span>
			  	</div>		 
			 </div> 
 		</td>
 		<td> <button  class="btn" onClick="queryRoombi()">查询房币</button> </td>
 		<td> <label class="control-label" id="roombiTd" style="color:red; padding-left:10px;"> ${roombiTd}</label> </td>
 	</tr>
</table>
  <input type="text" placeholder="备注" name="remark" value="${remark}">
  <button type="submit" class="btn">打钱</button>
</form>


<ul class="breadcrumb">
  <li><a>按房间打今日工资</a></li>
</ul>
<form id="form3" class="form-inline" action="issueRoombiSalary.do" method="post">
<table>
	<tr>
    	<td><input type="text" class="input-small" placeholder="房间id" name="roomId" value=""></td>
 		<td> <input type="text" class="input-small" placeholder="房币工资" name="roombi" value=""></td>
 	</tr>
</table>
  <input type="text" placeholder="备注" name="remark" value="${remark}">
  <button type="submit" class="btn">打钱</button>
</form>

<form class="form-inline" action="issuelog.do" method="post">
<table>
	<tr>
		<td>
			<label class="control-label" for="begtime">从 :</label>
		</td>
		<td>
			<div class="controls">
				<div class="input-append datepicker" id="datetimepicker"   pickTime=true >
				    <input data-format="yyyy-MM-dd hh:mm" type="text" name="begtime" id="begtime" value="${begtime}"></input>
				    <span class="add-on">
				      <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
				    </span>
			  	</div>		 
			</div> 
		</td>	
		<td>
			<label class="control-label" for="begtime">  到:</label>
		</td>
		<td>
			<div class="controls">
				<div class="input-append datepicker" id="datetimepicker"   pickTime=true >
				    <input data-format="yyyy-MM-dd hh:mm" type="text" name="endtime" value="${endtime}" id="endtime"></input>
				    <span class="add-on">
				      <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
				    </span>
			  	</div>		 
			</div>
		</td>
		
		<td>
			<button type="submit" class="btn"> 查询 </button>
		</td>
		
	</tr>
</table>
</form>


<table class="table table-bordered">
  <thead>
    <tr>
      <th>时间</th>
      <th>用户</th>
      <th>房币</th>
      <th>操作人</th>
      <th>备注</th>
    </tr>
  </thead>
  <tbody>
  <c:forEach var="m" items="${list}">
    <tr>
      <td>${m.CreateAt}</td>
      <td><tags:user id="${m.UserId}"/></td>
      <td>${m.roombi}</td>
      <td>${m.Operator}</td>
      <td>${m.Remark}</td>
    </tr>
  </c:forEach>
  </tbody>
</table>
<tags:page1 page="${page}" pageSize="${pageSize }" total="${total }" url="?begtime=${begtime}&endtime=${endtime}&page="/>
</body>
</html>